<?php
namespace API\Controller;
use Think\Controller;
class ClassController extends Controller {
    public function getclass(){
        $class=M('class');
        $data=$class->order("classid")->select();
        echo json_encode($data);
   

    }
    public function getclassbyid(){
    	$classid=$_GET['classid'];
        $class=M('class');
        $data=$class->where("classid=$classid")->select();
        echo json_encode($data);
   

    }
   public function getclassbyname(){
    	$classname=$_GET['classname'];
        $class=M('class');
        $data=$class->where("classname=$classname")->select();
        echo json_encode($data);
   

    } 
}